<div class="deliver-container">
  <div class="text-right">
    <button class="btn2" routerLink="delivery-add">新建运费模板</button>
  </div>

  <div class="delivery-list">

    <div class="delivery-item" *ngFor="let item of expressTempList" [ngClass]="{'delivery-item-active': item.id === operateId}">
      <div class="delivery-describe-warp">
        <div class="delivery-describe">{{item.name}} ({{item.updated_at}} 更新)</div>
        <div class="delivery-function">
          <a href="javascript:;" (click)="showDetail(item.id)">查看</a>
          <a href="javascript:;" routerLink="delivery-edit/{{item.id}}">编辑</a>
          <a href="javascript:;" (click)="delTemp(item.id)">删除</a>
        </div>
      </div>
    </div>

    <table class="table" *ngIf="!!expressTempDetail">
      <thead>
        <tr>
          <th>配送方式</th>
          <th>配送范围</th>
          <th>首重（g）</th>
          <th>起步价（￥）</th>
          <th>续重（g）</th>
          <th>续价（￥）</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let item of expressTempDetail">
          <td>{{item.type}}</td>
          <td>{{item.range}}</td>
          <td>{{item.starting_weight}}</td>
          <td>{{item.starting_weight_price/1000}}</td>
          <td>{{item.exceed_weight}}</td>
          <td>{{item.exceed_weight_price/1000}}</td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

<!-- 是否确定删除 -->
<div class="modal fade" bsModal #deleteModal="bs-modal" tabindex="-1">
  <div class="modal-dialog modal-md">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">确认</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="deleteModal.hide()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body text-center">
        <p>确定删除吗？</p>
        <div class="text-right mt20">
          <button class="btn btn-default btn-md-long" type="button" (click)="deleteModal.hide()">取消</button>
          <button class="btn btn-success btn-md-long" type="button" (click)="delSubmit()">确定</button>
        </div>
      </div>
    </div>
  </div>
</div>

<app-notification [type]="type" [message]="message" [isShow]="isShow" (promptIsShow)="promptIsShow($event)"></app-notification>
